<%@ page import='es.ats.codington.festival.domain.Place' %>
<%@ page import="java.util.ArrayList" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<link type="text/css" rel="stylesheet" href="css/mystyle.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=1.4.2"></script>
    <script src="js/login.js"></script>
</head>
<body>

<!--anotacion-->
	
	<!--  <div class="cabecera_imagen"></div>-->
 
<!-- <br/><%=request.getAttribute("ID")%> -->
<!-- <br/><%=request.getAttribute("Name")%> -->

 <div id="container"> <!--para centrar cuadro-->
   <!-- Login Starts Here -->
    <header>
   <nav>
   <ul class="">
  <li id="logo" ><img src="./images/logo2.jpg"></li>
 <%   Object iD = session.getAttribute("iDVisitor");
int id= (Integer) iD; 
		    
if (id==1){%>

 <li id="ref1"><a href="neweventregistrationadd.jsp">Register event</a></li> 
<li id="ref1"><a href="createplace.jsp">Create new place</a></li> 
<li id="ref1"><a href="modifypassword.jsp">Update password</a></li>
<li id="ref1"><a href="update.jsp">Update information</a></li> 

   <% }else{%>
<li id="ref1"><a href="ViewMyEventServlet">My Events</a></li> 
<li id="ref1"><a href="modifypassword.jsp">Update password</a></li>
<li id="ref1"><a href="update.jsp">Update information</a></li>  


<%} %> 

</ul>
</nav>
</header>
<%String usu=(String)session.getAttribute("username"); %>
<% String pass=(String)session.getAttribute("password"); %>
            <div id="loginContainer">
            </form id="loginForm">
 
<form class="ViewPlaceServlet" action="LogoutServlet" method="GET" >
			<input id="loginButtonOut" type="submit" value="Logout" />
				<!-- <a href="LogoutServlet" id="loginButtonOut" ><span>Logout</span><em></em></a> -->
				<h3> Bienvenido <%=usu%></h3> 
				</form>

		 </div>
		<div id="columna">
		
	<div class="Sub_title">
	
        <p>MENU</p>
   	</div>
	
	<div id="header2">
	<ul class="nav2">
		<ul>
			<li><a href="mainpage2.jsp">Home</a></li>
			<br>
			<li><a href="history.jsp">History</a></li>
			<br>
			<li><a href="">North City<br></a>
			<br>
			<ul>
			<div class="menunorth">
			<li><a href="EventByPlaceServletMuseum?type=Museum">Museum</a></li>
			<br>
			<li><a href="EventByPlaceServletTheater?type=Theater">Theater</a></li>
			<br>
			<li><a href="EventByPlaceServletStadium?type=Stadium">Stadium</a></li>
			<br>
			<li><a href="EventByPlaceServletBusiness?type=large Business">Large Business</a></li>
			</div>
			</ul>
			</li>
			<li><a href="">South City</a>
			<ul>
			<div class="menusouth">
			<li><a href="EventByPlaceServletZoo?type=Zoo">Zoo</a></li>
			<br>
			<li><a href="EventByPlaceServletPark?type=Park">Park</a></li>
			<br>
			<li><a href="EventByPlaceServletAttraction?type=Tourist Attraction">Turist Attraction</a></li>
			<br>
			<li><a href="EventByPlaceServletMarket?type=Traditional Market">Traditional Market</a></li>
			</div>
			</ul>
			</li> 
		</ul>
	</ul>
	</div>
	
	</div>
	
	
	<div class="titulo">
        <p>Festival Registration System</p>
   	</div>
	<div class="cuadroblanco">
	<div class="Sub_title">
        <p>Places</p>
   	</div>

	
    <section class="div_borde"> 
	<div id=tabla1>
        <form class="ViewAllEventServlet" action="ViewAllEventServlet" method="GET">
			
			
			<% int size =(Integer) request.getAttribute("size");%>
			<% ArrayList<Place> allplaces  = new ArrayList<Place>(); %>
			
			<% allplaces = (ArrayList<Place>) request.getAttribute("place"); %>
		<table>
		
			<tr>
				<td for="placename"><strong>NAME</strong></td>
				<td for="address"><strong>ADDRESS</strong></td>
	
			</tr>
			<% 	for (int _i0 = 0;_i0 < size ; _i0++) { %>

			<tr>
			<% int idplace = allplaces.get(_i0).getiDplace(); %>
			<a href="ViewPlaceServlets" >
			
				<td > <%= allplaces.get(_i0).getName()%>  </td>
				<td> <%= allplaces.get(_i0).getAddress()%></td>
					</a>	
			</tr>
				
			
			<%
		       	        
		      } %>
			
			</table>
</form>
</div>
   </section>
		 </br></br>
	</div>
    
   <!--  <footer>	
	
    	<p class="NewCod">New Codington</p></a>
    </footer> -->
 
</body>
</html>